You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tracing-icon.tsx 631B

12345678910111213141516171819202122232425262728
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import cn from '@/utils/classnames'
  5. import { TracingIcon as Icon } from '@/app/components/base/icons/src/public/tracing'
  6. type Props = {
  7. className?: string
  8. size: 'lg' | 'md'
  9. }
  10. const sizeClassMap = {
  11. lg: 'w-9 h-9 p-2 rounded-[10px]',
  12. md: 'w-6 h-6 p-1 rounded-lg',
  13. }
  14. const TracingIcon: FC<Props> = ({
  15. className,
  16. size,
  17. }) => {
  18. const sizeClass = sizeClassMap[size]
  19. return (
  20. <div className={cn(className, sizeClass, 'bg-primary-500 shadow-md')}>
  21. <Icon className='h-full w-full' />
  22. </div>
  23. )
  24. }
  25. export default React.memo(TracingIcon)